To print your program from the Borland IDE, you should have your program file open and in front of you. Click in the edit window to make sure the file is in the foreground; remember a window foregrounded when its title bar is blue rather than gray. Below we have written a small program, and have the window selected so it is ready for printing:
Now simply use the File/Print menu option to print
the program:
Selecting this menu option will open a dialogue box giving
you several print options.
If you are happy with these options, simply click on OK
and your program will be printed on one of the printers in the printer
room (1359). You can go to 1359 and search all the printers to look for
your program, or you can try to use the Check Print Queues
program to locate the printer. Check Print Queues can be found under the
Administration group in the
Program
Manager.
If you have ".h" files as well as a ".cpp" file, you will have to open them and print them by just the same method you used for your program file. If you are working with a project you must open each file in the project (".h" and ".cpp" files) and print them separately.
Printing a program's output is also easy in Borland 4.5. Run your program as usual, but when it is done, don't close the output window. Instead, use the mouse to pull down a menu from the upper-left hand corner of the window:
Select the print option and you get a printing dialogue box
(though it looks different from the one you saw when printing a program).
Just click on the OK button, and the entire run of your program
will be printed out on one of the printers in 1359.
Of course, if you are sending your output to a file, you can
open that file in the Borland IDE, and print it out just like you did for
your ".h" and ".cpp" files as described above. If you
keep trying to print something, but it never shows up at the printers, it
could be that you have used up your paper quota (see the
CS 302 FAQ -
Miscellaneous Problems